package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author TomXue
 * @since 2018-06-29
 * 担保服务费收取节点枚举
 */
@AllArgsConstructor
@Getter
public enum GuaranteeFeeChargeNodeEnum {

    MAKE_LOAN ((byte)1,"放款时"),
    REPAY_FIRST_PERIOD((byte)2,"还款第一期"),
    REPAY_PER_OERIOD((byte)3,"还款每期");

    private Byte node;
    private String desc;


    public static GuaranteeFeeChargeNodeEnum enumOf(byte node) {
        for (GuaranteeFeeChargeNodeEnum guaranteeFeeChargeNodeEnum : values()) {
            if (guaranteeFeeChargeNodeEnum.node.equals(node)) {
                return guaranteeFeeChargeNodeEnum;
            }
        }
        return null;
    }
}
